# Specific token for CUDA

from yacf.Frontend.C99 import c99_lexer

class CUDALexer(object):

	tokens = c99_lexer.C99Lexer.tokens + (
       'LKLAUNCH', 
	   'RKLAUNCH', # CUDA kernel launch
       'GLOBAL',
	)

	t_LKLAUNCH  = r'<<<'
	t_RKLAUNCH  = r'>>>'


	def t_GLOBAL(self, t):
		r'__global__'
		t.type = 'GLOBAL'
		return t


